/**
 * 
 */
package com.demo2do.strawberry.entity.investor;

import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.demo2do.strawberry.entity.user.member.Member;
import com.demo2do.strawberry.entity.user.profile.Profile;
import com.demo2do.strawberry.entity.user.profile.ProfileAware;

/**
 * @author lute
 *
 */
@Entity
@Table(name = "investor")
public class Investor implements ProfileAware {
	
	@Id
	@GeneratedValue
	private Long id;
	
	private String businessCard;
	
	private String title;
	
	@Embedded
	private Finance finance;
	
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	private Institution institution;
	
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	private Member member;
	
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	private Profile profile;
	
	/**
	 * default constructor 
	 */
	public Investor() {
		
	}
	
	/**
	 * @param businessCard
	 * @param institution
	 * @param profile
	 * @param member
	 */
	public Investor(String businessCard, Institution institution, Profile profile, Member member) {
		this.businessCard = businessCard;
		this.title = null;
		this.finance = null;
		this.institution = institution;
		this.member = member;
		this.profile = profile;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	
	/**
	 * @return the businessCard
	 */
	public String getBusinessCard() {
		return businessCard;
	}
	
	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @return the finance
	 */
	public Finance getFinance() {
		return finance;
	}

	/**
	 * @return the institution
	 */
	public Institution getInstitution() {
		return institution;
	}
	
	/**
	 * @return the member
	 */
	public Member getMember() {
		return member;
	}
	
	/**
	 * @return the profile
	 */
	public Profile getProfile() {
		return profile;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * @param businessCard the businessCard to set
	 */
	public void setBusinessCard(String businessCard) {
		this.businessCard = businessCard;
	}
	
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @param finance the finance to set
	 */
	public void setFinance(Finance finance) {
		this.finance = finance;
	}

	/**
	 * @param institution the institution to set
	 */
	public void setInstitution(Institution institution) {
		this.institution = institution;
	}
	
	/**
	 * @param member the member to set
	 */
	public void setMember(Member member) {
		this.member = member;
	}
	
	/**
	 * @param profile the profile to set
	 */
	public void setProfile(Profile profile) {
		this.profile = profile;
	}
	
}
